package pro1.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import pro1.model.Character;

public interface CharacterMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Character record);

    int insertSelective(Character record);

    Character selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Character record);

    int updateByPrimaryKey(Character record);
    
    @Select("select id, name, info, createtime from javaweb.`character` order by createtime desc")
    List<Character> selectAll();

	@Select("select id, name, info, createtime from javaweb.`character` where name=#{name}")
	Character selectByName(@Param("name") String name);
}